package control;
import java.awt.event.*;
import java.awt.Color;
import view.ExtendedTextField;
import model.Model;
import view.dataPane;
public class DataHandler implements FocusListener{
    
    @Override
    public void focusGained(FocusEvent e) {
        ((ExtendedTextField) e.getSource()).setBackground(Color.pink);
        
    }

    @Override
    public void focusLost(FocusEvent e) {
        ((ExtendedTextField) e.getSource()).setBackground(Color.lightGray);
        String newValue = ((ExtendedTextField) e.getSource()).getText();
        int id = ((ExtendedTextField) e.getSource()).getId();
        Model.getModel().getCurrentMp3().setValueByIndex(newValue+id, id);

    }
    
    
    
    
}
